From uunet!cs.ruu.nl!piet@entropy.ms Fri Apr 21 10:26:33 1989 To: TeXhax@JUNE.CS.WASHINGTON.EDU Date: Fri, 17 Mar 89 16:25:53 +0100 From: uunet!cs.ruu.nl!piet@entropy.ms (Piet van Oostrum) Subject: General headers and footers in Latex documents Keywords: LaTeX, headers, footers

Here is a documentstylestyle option that allows you to customize your page headers and footers in an easy way. It combines features that were separately available in other pagestyles, without introducing much complexity. You can define: - three-part headers and footers - rules in header and footer - headers and footers wider than - multiline headers and footers - separate headers and footers for even and odd pages - separate headers and footers for chapter pages

To use this pagestyle, you must include the ``fancyheadings'' style option in your and issue the command.The command should be issued after any changes made toThe page layout will be as follows: LHEAD CHEAD RHEAD ———————————– (rule) page body ———————————– (rule) LFOOT CFOOT RFOOTThe L-fields will be leftadjusted, the C-fields centered and theR-fields rightadjusted.Each of the six fields and the two rules can be defined separately.Simple use:The header and footer fields can be defined by commands LHEADand so on for the other fields. If the field depends on something in thedocument (e.g. section titles) you must in general use the dommands, otherwise a title may end on the wrong page. Youcan do this e.g. by redefining the commands so on (see example below). The defaults for these marks are as inthe standard pagestyles. The marks can be put into a header or footerfield by referencing and .Rules in header and footerThe thickness of the rules below the header and above the footer can bechanged by redefining the length parameters (default0.4pt) and (default 0). These may be redefined by the command. A thickness of 0pt makes the rule invisible.If you want to make more complicated changes, you have to redefine thecommands and/or .Headers and footers wider than headers and footers are set in a box of width . Thedefault for this is the value of You can make it wider (orsmaller) by redefining with the or . The headers and footers will stick out the page on the sameside as the marginal notes. For example to include the marginal notes,add both and to (see also theexample below).Multiline headers and footersEach of the six fields is set in an appropriate parbox, so you can put amultiline part in it with the
command. It is also possible to putextra space in it with the
ommand. Note that if you do this youwill probably have to increase the or lengths.Separate headers and footers for even and odd pagesIf you want the headers and footers to be different on even- andodd-numbered pages in the ``twoside'' style, the field-defining macroscan be given an optional argument, to be used on the even-numberedpages, like [EVEN-LHEAD]ODD-LHEAD.Separate headers and footers for chapter pagesLaTeX gives a command for the first page of thedocument, the first page of each chapter and a couple of other pages. Itmight be incompatible with your pagestyle. In this case you can use aslightly different version of the pagestyle, called . This pagestyle redefines the pagestyle ``plain'' to also use pagestyle``fancy'' with the following modifications: - the thicknesses of the rules is defined by and (both default 0). - the 6 fields may be defined separately for the plain pages by giving them the value PLAIN-VALUENORMAL-VALUE. This construct may be used in both the optional argument and the normal argument. Thus [F1F2]F3F4 specifies the LHEAD value in a two-sided document: F1 on an even-numbered ``plain'' page F2 on an even-numbered normal page F3 on an odd-numbered ``plain'' page F4 on an odd-numbered normal page.Defaults:0.4pt0pt0pt0pt[][] Examples:To put two lines containing the section title and the subsection titlein the righthandside corner, use:

The following definitions give an approximation of the style used in the LaTeX book:

[] []